#ifndef DEFINITIONS_H
#define DEFINITIONS_H
//Includes
#include <atlbase.h>
#include <d3d11.h>
#include <DirectXMath.h>

#pragma comment(lib, "d3d11.lib")

using namespace ATL;
using namespace DirectX;

//enum BufferSlots {SQUARE,CUBE,STAR,TRIANGLE,LINE,TIME,NUM_BUFFERS};
//enum VSSlots {UVPOS,NORMPOS,UVNORMPOS,NUM_VS};
//enum PSSlots {BASIC,UV,NUM_PS};

//PREPROCESSOR CONSTANTS
#define WINDOW_CLASS_NAME L"TEMPLATE"
#define WINDOW_TITLE L"TEMPLATE"
#define WINDOW_ERROR L"TEMPLATE ERROR"
#define WINDOW_WIDTH 1280
#define WINDOW_HEIGHT 760
#define BACKBUFFER_WIDTH WINDOW_WIDTH
#define BACKBUFFER_HEIGHT WINDOW_HEIGHT
#define IS_WINDOWED TRUE
#define NEAR_PLANE 0
#define FAR_PLANE 1

//PREPROCESSOR MACROS
#define ERRORMESSAGE(_wString) MessageBox(HWND_DESKTOP,_wString, WINDOW_ERROR, MB_OK | MB_ICONERROR);
#define ERRORCHECK(_hr,_wString) if(FAILED(hr)) ERRORMESSAGE(_wString);
#define RotateX(_degrees) XMMatrixRotationX(XMConvertToRadians(_degrees))
#define RotateY(_degrees) XMMatrixRotationY(XMConvertToRadians(_degrees))
#define RotateZ(_degrees) XMMatrixRotationZ(XMConvertToRadians(_degrees))
#define SAFE_RELEASE(ptr) if(ptr){ ptr->Release(); ptr = nullptr;}
#define ColorRGB(r,g,b) XMFLOAT4(r/255.0f,g/255.0f,b/255.0f,1.0f)
#define ColorRGBA(r,g,b,a) XMFLOAT4(r/255.0f,g/255.0f,b/255.0f,a/255.0f)
#define PosXYZ(x,y,z) XMFLOAT4(x,y,z,1.0f)

#endif